package com.hamizhong.iflowers.interceptor;

import com.hamizhong.iflowers.utils.MyConstants;
import com.hamizhong.iflowers.web.base.MyBaseInterceptor;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;

public class AdminLoginInterceptor extends MyBaseInterceptor {

	@Override
	public String intercept(ActionInvocation actionInvocation) throws Exception {
		logger.info("-------------------- Hello AdminLoginInterceptor ----------------------");
		
		if(getSSN().getAttribute(MyConstants.IFLOWERS_LOGIN_ADMIN_VO) == null) {
			return "LoginADM";
		}else {
			return actionInvocation.invoke();
		}
		
	}



}
